/**
 * System Role
 */
class Role {
    String roleName
    String description

	static mapping = {
		table 'GEXT_ROLE'
		users joinTable:'GEXT_USER_ROLE'
		privileges joinTable:'GEXT_ROLE_PRIV'
	}

	static belongsTo = User
	static hasMany=[privileges: Privilege, users: User]

	static constraints = {
		roleName(unique:true, blank:false, maxSize:16)
		description(maxSize:256)
	}

	String toString(){
				"${this.roleName}"
	}
}
